﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 面向对象练习
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //第一步 生成老师对象
            Teacher teacher = new Teacher();
            teacher.Name = "李老师";
            teacher.Id = "G08806";

            //第二步 生成两名学生
            Student s0 = new Student();
            s0.Name = "小王";
            s0.Id = "G00106";

            Student s1 = new Student();
            s1.Name = "小鸣";
            s1.Id = "G00205";

            //第三步 生成课堂（设置老师）（加入两名学生）
            Lecture lecture = new Lecture(40); 
            lecture.setTeacher(teacher);

            if (!lecture.AddStudent(s0)) 
            {
                Console.WriteLine("加入学生失败！");
            }

            if (!lecture.AddStudent(s1))
            {
                Console.WriteLine("加入学生失败！");
            }

            //第四步 开始上课点名
            lecture.StartLecture();
            

            Console.Read();
        }
    }
}
